namespace Umdf.ComInterop
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    [ComImport, Guid("AD368EBE-4139-43E3-A875-69B266A9139C"), TypeLibType((short) 0x200), InterfaceType((short) 1)]
    public interface IWDFDriver : IWDFObject
    {
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void DeleteWdfObject();
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void AssignContext([In, MarshalAs(UnmanagedType.Interface)] IObjectCleanup pCleanupCallback, [In] IntPtr pContext);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void RetrieveContext(out IntPtr ppvContext);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void AcquireLock();
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void ReleaseLock();
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void CreateDevice([In, MarshalAs(UnmanagedType.Interface)] IWDFDeviceInitialize pDeviceInit, [In, MarshalAs(UnmanagedType.IUnknown)] object pCallbackInterface, [MarshalAs(UnmanagedType.Interface)] out IWDFDevice ppDevice);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void CreateWdfObject([In, MarshalAs(UnmanagedType.IUnknown)] object pCallbackInterface, [In, MarshalAs(UnmanagedType.Interface)] IWDFObject pParentObject, [MarshalAs(UnmanagedType.Interface)] out IWDFObject ppWdfObject);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void CreatePreallocatedWdfMemory([In] ref byte pBuff, [In, ComAliasName("Umdf.ComInterop.ULONG_PTR")] uint BufferSize, [In, MarshalAs(UnmanagedType.IUnknown)] object pCallbackInterface, [In, MarshalAs(UnmanagedType.Interface)] IWDFObject pParentObject, [MarshalAs(UnmanagedType.Interface)] out IWDFMemory ppWdfMemory);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void CreateWdfMemory([In, ComAliasName("Umdf.ComInterop.ULONG_PTR")] uint BufferSize, [In, MarshalAs(UnmanagedType.IUnknown)] object pCallbackInterface, [In, MarshalAs(UnmanagedType.Interface)] IWDFObject pParentObject, [MarshalAs(UnmanagedType.Interface)] out IWDFMemory ppWdfMemory);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        int IsVersionAvailable([In] ref UMDF_VERSION_DATA pMinimumVersion);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void RetrieveVersionString([Out, MarshalAs(UnmanagedType.LPWStr)] string pVersion, [In, Out] ref uint pdwVersionLength);
    }
}

